package cn.wdm.ymcc.domain;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author lao.zhang
 * @since 2022-07-20
 */
@TableName("t_block")
@Data
public class Block extends Model<Block> {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String ip;
    private String reason;
    private Date blacktime;
    private String phone;
    private Long messageId;

    @TableField(exist = false)
    private Integer blackorwhite;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Date getBlacktime() {
        return blacktime;
    }

    public void setBlacktime(Date blacktime) {
        this.blacktime = blacktime;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Block{" +
        ", id=" + id +
        ", ip=" + ip +
        ", reason=" + reason +
        ", blacktime=" + blacktime +
        ", phone=" + phone +
        "}";
    }
}
